package com.example.questionnaire.task;

import com.example.questionnaire.mbg.service.IQuestionnaireService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Date;

@Component
public class Task {

    @Resource
    IQuestionnaireService questionnaireService;

    @Scheduled(cron = "0/1 * * * * ?")
    public void task01() throws InterruptedException {
        questionnaireService.check(new Date());
    }

}
